/**
 * use GM_xmlhttpRequest(details) download a file, and upload it!
 *
 * @see <a href="https://www.tampermonkey.net/documentation.php#GM_xmlhttpRequest">tamperMonkey doc</a>
 * @since 2022110
 */
// download
GM_xmlhttpRequest({
    url: decodeURIComponent('https://scontent-hkt1-1.cdninstagram.com/v/t51.2885-15/sh0.08/e35/c0.156.1253.1253a/s640x640/271401704_437677284691961_7321390911476137339_n.jpg?_nc_ht=scontent-hkt1-1.cdninstagram.com\u0026_nc_cat=105\u0026_nc_ohc=MDtd08mAiKkAX-b1O87\u0026edm=APU89FABAAAA\u0026ccb=7-4\u0026oh=00_AT-_Z24txZfrokO3rYZa2rmQrWLz8h1-fZZE2qy5OdzoTw\u0026oe=61E3ED2F\u0026_nc_sid=86f79a'),
    onload: (e) => console.log(window.temp1 = e),
    responseType: 'blob'
});
//temp1.response

// build FormData
fd = new FormData();
// add downloaded file
fd.append('file', temp1.response, 'aaa.jpg');

// upload
GM_xmlhttpRequest({
    url: appConfig.host + 'file',
    method: 'post',
    data: fd,
    overrideMimeType: 'multipart/form-data',
    onload: (e) => console.log(e)
});

// succeed!!!